package com.ruoyix.im.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyix.common.core.domain.PageQuery;
import com.ruoyix.common.core.domain.R;
import com.ruoyix.common.core.page.TableDataInfo;
import com.ruoyix.im.domain.ImChatGroup;
import com.ruoyix.im.domain.ImChatGroupUser;
import com.ruoyix.im.domain.bo.ImChatGroupUserBo;
import com.ruoyix.im.domain.vo.GroupUserVO;
import com.ruoyix.im.domain.vo.ImChatGroupUserVo;


import java.util.Collection;
import java.util.List;

/**
 * 聊天群成员Service接口
 *
 * @author ruoyi
 * @date 2024-05-27
 */
public interface IImChatGroupUserService extends IService<ImChatGroupUser> {

    /**
     * 查询聊天群成员
     */
    ImChatGroupUserVo queryById(Long id);

    /**
     * 查询聊天群成员列表
     */
    TableDataInfo<ImChatGroupUserVo> queryPageList(ImChatGroupUserBo bo, PageQuery pageQuery);

    /**
     * 查询聊天群成员列表
     */
    List<ImChatGroupUserVo> queryList(ImChatGroupUserBo bo);

    /**
     * 新增聊天群成员
     */
    Boolean insertByBo(ImChatGroupUserBo bo);

    /**
     * 修改聊天群成员
     */
    Boolean updateByBo(ImChatGroupUserBo bo);

    /**
     * 校验并批量删除聊天群成员信息
     */
    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);

    public R<Page<GroupUserVO>> getGroupUserByStatus (Long groupId, Integer userStatus, Long current, Long size);

    public R<Void> enterGroup(Long id, String remark);

    public R<Void> changeUserStatus(Long groupId, Long userId, Long userStatus, Long oldUserStatus);

    public R<Void> changeAdmin(Long groupId, Long userId, Boolean adminFlag);


    public R<Void> getGroupUser(Long id);

    public R<Page<GroupUserVO>> getPagePoetryResult(Long groupId, Long current, Long size);
}
